package com.ruoyi.framework.auth2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 数据源切换处理
 * 
 * @author ruoyi
 */
public class Auth2ContextHolder {
	public static final Logger log = LoggerFactory.getLogger(Auth2ContextHolder.class);

	private static final ThreadLocal<Boolean> CONTEXT_HOLDER = new ThreadLocal<>();

	public static void setSSO(Boolean isSsso) {
		CONTEXT_HOLDER.set(isSsso);
	}

	public static boolean isSSO() {
		return CONTEXT_HOLDER.get();
	}

	public static void clear() {
		CONTEXT_HOLDER.remove();
	}
}
